Imports System
Module qs


    ' ByVal 形参和实参使用不同的内存地址单元
    ' ByRef 形参和实参使用相同的内存地址单元
    Sub exam(ByVal a As Integer, ByRef b As Integer)
        a = a + 2
        b = b + 2
    End Sub

    Sub Main()
        Dim a As Integer = 6
        Dim b As Integer = 6
        exam(a,b)
        Console.WriteLine("a={0},b={1}", a,b)
        Console.ReadKey()
    End Sub 
    ' a=6,b=8

End Module
